"use strict";
/*
 
    类的继承和重写   TS只能单层继承

 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Gege = /** @class */ (function () {
    function Gege(sex, name, age) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
    Gege.prototype.say = function () {
        console.log("father-123456");
    };
    Gege.prototype.sayHello = function () {
        console.log("father-123456");
    };
    return Gege;
}());
var ge = new Gege('youchen', 'boy', 16); //和 constructor 保持一致
var Child = /** @class */ (function (_super) {
    __extends(Child, _super);
    function Child() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.look = 'handsome';
        return _this;
    }
    Child.prototype.play = function () {
        console.log("child-子类的一个方法!");
    };
    Child.prototype.sayHello = function () {
        _super.prototype.sayHello.call(this);
        console.log("child-重写父类的方法，添加新的东西！");
    };
    return Child;
}(Gege));
var child = new Child('xiaoxiao', 'boy', 2);
child.play();
child.sayHello();
